#define _CRT_SECURE_NO_WARNINGS	


int cmp(const void* x, const void* y)
{
    return *((char*)(x)) - *((char*)(y));
}

bool CheckPermutation(char* s1, char* s2)
{
    int len1 = strlen(s1);
    int len2 = strlen(s2);
    if (len1 != len2)
        return false;
    qsort(s1, len1, 1, cmp);
    qsort(s2, len2, 1, cmp);
    for (int i = 0; i < len1; i++)
    {
        if (s1[i] != s2[i])
            return false;
    }
    return true;
}